Every CPU designed has it's own architecture: - logic pathways - caching CPUs speak their own languages called assembly languages. ### Emulation - Key concept upon which virtualization and many types of simulation are built - Emulation is the process of **artificially executing code intended for a “foreign” architecture and hardware profile** by converting it to the ASM language that the CPU in use can actually understand. This can be done in a high-level or a low-level manner, the latter being far more accurate. - In **high-level emulation**, an application simply looks at the gist of the exotic instructions and **approximates** them through a lot of pre-defined functions that result in more or less the intended result. - **Low-level emulation** looks at all of the different sets of instructions—CPU instructions, graphical instructions, memory management, and sound (where applicable)—and **directly converts these into identical instructions the hardware in question can execute.** As we said, this is much more accurate (often 99 or even 100% these days) but far more demanding. - Softwares running inside emulators don't necessarily have to be made for underlying hardware - An emulator allows one type of OS to run applications for different OS. So, for example, there are emulators for Commodore Amiga or Atari ST for the PC. - a technique in which Virtual machines simulates complete hardware in software ### Simulation ### Virtual Machines Where interpreters executed simple scripts in a high-level manner, virtual machines implemented something like a simple custom computer architecture entirely residing in software. ### Virtualization can run only those softwares which can already run on underlying hardware - Virtualisation is taking an OS and slipping in a middleman (known as the hypervisor) between it and the hardware. Meaning you can run multiple OS's simultaneously on one set of hardware. ![[Pasted image 20211107120358.png]] ![[Pasted image 20211107120929.png]] ![[Pasted image 20211107121754.png]] #hardware